#include<stdio.h>
void print(unsigned int a)
{
	if (a / 10 == 0)
		printf("%d ", a);
	else
	{
		print(a / 10);
		printf("%d ", a % 10);
	}
}
int main()
{
	unsigned int a = 0;
	scanf_s("%d", &a);
	
	print(a);

	return 0;
}